package nimingneibulei;

public class Test {
    public interface Swimming {
        public void swim();
    }
    public static void main(String[] args) {
        Swimming s = new Swimming() {
            @Override
            public void swim() {
                System.out.println("jijjijiji");
            }
        };

        go(new Swimming(){
            @Override
            public void swim() {
                System.out.println("j猫jijiji");
            }
        });
    }

    public static void go(Swimming s) {
        System.out.println("开始游");
        s.swim();
    }

}
